import { Switch } from 'antd'

/*
switch
      checked   指定当前是否选中
      onChange  变化时的回调函数

import SwitchComponent from '@/components/antd-comp/switch'

const [isChecked, setIsChecked] = useState(false)
const handleChange = checked => {
  setIsChecked(checked)
}
<SwitchComponent checked={isChecked} onChange={handleChange} size="large"/>
*/
const SwitchComponent = ({ checked, onChange, ...props }) => {
  return <Switch checked={checked} onChange={onChange} {...props} />
}

export default SwitchComponent
